Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receive and send valset reward on cosmos side instead of ethereum. #91

Merged
merged 1 commit into from
Jul 5, 2022

Conversation

dzmitryhil
Copy link

solidity/Gravity contract

  • remove ERC20 valset reward
  • change the ValsetArgs/(address rewardToken -> string rewardDenom)
  • add the rewardRecipient param to method and event
  • update the solidity vesrion to 0.8.15

module/Go

  • mint and send reward to the recipient once the "MsgValsetUpdatedClaim" is attested
  • update the valset members signing and sorting (refactored to keep it on once place)
  • update the valset-reward params to support only cosmos native tokens

orchestrator/Rust

  • update the orchestrator and relayer to be compatible with the updated Gravity contract
  • update the valset members signing and sorting (refactored to keep it on once place), be se same as in Go module
  • add the rewardRecipient values from the orchestrator cosmos key converted to address.
  • change the cosmos fee for all tests from "foo" to "stake" token
  • fix/refactor broken integration tests after the changes

@dzmitryhil dzmitryhil requested a review from AaronKutch July 1, 2022 10:36
@AaronKutch
Copy link

I think your strategy with addresses needs to be rethought. There are several places where addresses are converted to and from their string representations which is both nonperformant and error-prone. On the Rust side there are from_u8_array, as_bytes, and from_slice functions for Addresses. On the Go side there should be similar functions or you could add such things.

solidity/Gravity contract

* remove ERC20 valset reward
* change the ValsetArgs/(address rewardToken ->  string rewardDenom)
* add the rewardRecipient param to method and event
* update the solidity vesrion to 0.8.15

module/Go

* mint and send reward to the recipient once the "MsgValsetUpdatedClaim" is attested
* update the valset members signing and sorting (refactored to keep it on once place)
* update the valset-reward params to support only cosmos native tokens

orchestrator/Rust

* update the orchestrator and relayer to be compatible with the updated Gravity contract
* update the valset members signing and sorting (refactored to keep it on once place), be se same as in Go module
* add the rewardRecipient values from the orchestrator cosmos key converted to address.
* change the cosmos fee for all tests from "foo" to "stake" token
* fix/refactor broken integration tests after the changes
@dzmitryhil dzmitryhil force-pushed the dzmitryhil/valset-native-reward branch from 92ceb26 to 1780ba4 Compare July 4, 2022 08:44
@dzmitryhil dzmitryhil requested a review from AaronKutch July 4, 2022 10:40
@dzmitryhil dzmitryhil merged commit 7f1daf8 into native-reward Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants